import create from 'zustand'
let storage = window.localStorage

const store = create((set)=>({
  localUrl:"http://127.0.0.1:7878/",//本机运行的后台地址与端口
  // localUrl:"http://192.167.77.16:2233/",//本机运行的后台地址与端口
  user:JSON.parse(storage.getItem("user")||"{}"),
  setuser:(user)=>set(()=>({
    user:user
  })),
  sysInfo:JSON.parse(storage.getItem("sysInfo")||"{}"),
  setsysInfo:(sysInfo)=>set(()=>({
    sysInfo:sysInfo
  }))
}))

export default store;